package com.tgy.clickhouse.dao;

import com.tgy.clickhouse.annotation.DataSourceAnnotation;
import com.tgy.clickhouse.datasource.AIopsDynamicDatasource;
import com.tgy.clickhouse.entity.Alarm;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface TestClickHouseMapper {

    /**
     * 使用Mysql 1 默认连接
     * @return
     */
    List<String> selectCl();

    /**
     * 使用CH查询
     * @param List<String>
     * @return
     */
    @DataSourceAnnotation(AIopsDynamicDatasource.CLICKHOUSE_DATASOURCE)
    List<String> queryList();

    @DataSourceAnnotation(AIopsDynamicDatasource.MYSQL_DATASOURCE_2)
    List<String> select2();

    @DataSourceAnnotation(AIopsDynamicDatasource.CLICKHOUSE_DATASOURCE)
    int insert(Alarm alarm);
}
